﻿<navigation:Page 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="WellDone.Reports"
           mc:Ignorable="d"
           d:DesignWidth="800" d:DesignHeight="480"
           Title="Reports Page"
           Style="{StaticResource PageStyle}" Loaded="Page_Loaded"
    >
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="70*" />
            <RowDefinition Height="381*" />
        </Grid.RowDefinitions>
        <Grid Height="70" VerticalAlignment="Top">
            <ComboBox x:Name="cmbReportFrequency" HorizontalAlignment="Left" Margin="0,33,0,0" VerticalAlignment="Top" Height="26" Width="132" SelectedIndex="0" SelectionChanged="cmbReportFrequency_SelectionChanged" />
            <sdk:Label x:Name="lblFrequency" HorizontalAlignment="Left" Height="17" Margin="1,11,0,0" VerticalAlignment="Top" Width="120" Content="Frequency"/>
            <ComboBox x:Name="cmbReportName" HorizontalAlignment="Left" Margin="143,33,0,0" VerticalAlignment="Top" Width="168" Height="26" SelectionChanged="cmbReportName_SelectionChanged"/>
            <sdk:Label x:Name="lblName" HorizontalAlignment="Left" Height="17" Margin="144,11,0,0" VerticalAlignment="Top" Width="120" Content="Name"/>
            <sdk:Label x:Name="lblReport" HorizontalAlignment="Left" Height="17" Margin="318,36,0,0" VerticalAlignment="Top" Width="72" Content="Report Date"/>
            <sdk:Label x:Name="lblReportDate" HorizontalAlignment="Left" Height="17" Margin="395,37,0,0" VerticalAlignment="Top" Width="120" Content=""/>
            <Button x:Name="btnGenerate" Content="Generate" HorizontalAlignment="Left" Margin="537,31,0,0" VerticalAlignment="Top" Width="75" Click="btnGenerate_Click"/>
            <Button x:Name="btnExport" Content="Export" HorizontalAlignment="Left" Margin="629,31,0,0" VerticalAlignment="Top" Width="75" Click="btnExport_Click"/>
            <sdk:Label x:Name="lblGenerated" HorizontalAlignment="Left" Height="17" Margin="328,11,0,0" VerticalAlignment="Top" Width="62" Content="Generated"/>
            <sdk:Label x:Name="lblGeneratedDate" HorizontalAlignment="Left" Height="17" Margin="394,11,0,0" VerticalAlignment="Top" Width="156" Content=""/>
            <Button x:Name="btnPrint" Content="Print" HorizontalAlignment="Left" Margin="719,31,0,0" VerticalAlignment="Top" Width="75" Click="btnPrint_Click"/>
            <sdk:Label x:Name="lblReportsGenerating" HorizontalAlignment="Left" Height="15" Margin="13,5,0,0" VerticalAlignment="Top" Width="180" Content="Reports are being generated..." Visibility="Collapsed"/>
            <Button x:Name="btnCancel" Content="Cancel" HorizontalAlignment="Left" Margin="198,5,0,0" VerticalAlignment="Top" Width="75" Visibility="Collapsed" Click="btnCancel_Click"/>
            <sdk:Label x:Name="lblGeneratedBy" HorizontalAlignment="Left" Height="17" Margin="566,11,0,0" VerticalAlignment="Top" Width="82" Content="Generated By"/>
            <sdk:Label x:Name="lblGeneratedByUser" HorizontalAlignment="Left" Height="17" Margin="648,11,0,0" VerticalAlignment="Top" Width="120" Content=""/>
        </Grid>
        <sdk:DataGrid Grid.Row="1" AutoGenerateColumns="False" Name="dgReport" VerticalAlignment="Top" HorizontalAlignment="Left" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" IsReadOnly="true" SelectionMode="Single">
            <sdk:DataGrid.ColumnHeaderStyle>
                <Style  TargetType="sdk:DataGridColumnHeader" >
                    <Setter Property="FontSize" Value="10" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="00:00:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>

                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#FF1F3B53" Grid.ColumnSpan="2" Grid.RowSpan="2"/>

                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>

                                    <ContentPresenter
                        Grid.RowSpan="2"
                        
                        Cursor="{TemplateBinding Cursor}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>

                                    <Rectangle Name="VerticalSeparator" Grid.RowSpan="2" Grid.Column="2" Width="1" VerticalAlignment="Stretch" />

                                    <Path Grid.RowSpan="2" Name="SortIcon" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Grid.Column="1" Stretch="Uniform" Width="8" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF444444" />
                                        </Path.Fill>
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform x:Name="SortIconTransform" ScaleX=".9" ScaleY=".9" />
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>

                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </sdk:DataGrid.ColumnHeaderStyle>

            <sdk:DataGrid.Columns>
                <sdk:DataGridTextColumn x:Name="Column0" Binding="{Binding Column0}"/>
                <sdk:DataGridTextColumn x:Name="Column1" Binding="{Binding Column1}"/>
                <sdk:DataGridTextColumn x:Name="Column2" Binding="{Binding Column2}"/>
                <sdk:DataGridTextColumn x:Name="Column3" Binding="{Binding Column3}"/>
                <sdk:DataGridTextColumn x:Name="Column4" Binding="{Binding Column4}"/>
                <sdk:DataGridTextColumn x:Name="Column5" Binding="{Binding Column5}"/>
            </sdk:DataGrid.Columns>
        </sdk:DataGrid>
    </Grid>
</navigation:Page>
